'use strict';

const Controller = require('egg').Controller;
const md5 = require('md5');
const debug = require('debug')('schedule:controller:user');

class UserController extends Controller {
  async loginPage() {
    const { ctx } = this;
    await ctx.render('login');
  }

  async login() {
    const { ctx } = this;
    const username = ctx.request.body.username;
    const password = ctx.request.body.password;
    debug('username:' + username);
    debug('password:' + password);
    ctx.body = 'ok';
  }
}

module.exports = UserController;
